3.2.67 \(\int (a+b \tanh ^{-1}(\frac {c}{x^2})) \, dx\) [167]

Optimal. Leaf size=44 \[ a x+b \sqrt {c} \text {ArcTan}\left (\frac {x}{\sqrt {c}}\right )+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )-b \sqrt {c} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right ) \]

[Out]

a*x+b*x*arctanh(c/x^2)+b*arctan(x/c^(1/2))*c^(1/2)-b*arctanh(x/c^(1/2))*c^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6021, 269, 304, 209, 212} \begin {gather*} a x+b \sqrt {c} \text {ArcTan}\left (\frac {x}{\sqrt {c}}\right )+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )-b \sqrt {c} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c/x^2],x]

[Out]

a*x + b*Sqrt[c]*ArcTan[x/Sqrt[c]] + b*x*ArcTanh[c/x^2] - b*Sqrt[c]*ArcTanh[x/Sqrt[c]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (\frac {c}{x^2}\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+(2 b c) \int \frac {1}{\left (1-\frac {c^2}{x^4}\right ) x^2} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+(2 b c) \int \frac {x^2}{-c^2+x^4} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )-(b c) \int \frac {1}{c-x^2} \, dx+(b c) \int \frac {1}{c+x^2} \, dx\\ &=a x+b \sqrt {c} \tan ^{-1}\left (\frac {x}{\sqrt {c}}\right )+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )-b \sqrt {c} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 54, normalized size = 1.23 \begin {gather*} a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+\frac {1}{2} b \sqrt {c} \left (2 \text {ArcTan}\left (\frac {x}{\sqrt {c}}\right )+\log \left (\sqrt {c}-x\right )-\log \left (\sqrt {c}+x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c/x^2],x]

[Out]

a*x + b*x*ArcTanh[c/x^2] + (b*Sqrt[c]*(2*ArcTan[x/Sqrt[c]] + Log[Sqrt[c] - x] - Log[Sqrt[c] + x]))/2

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 39, normalized size = 0.89

method result size
default \(a x +b x \arctanh \left (\frac {c}{x^{2}}\right )+b \arctan \left (\frac {x}{\sqrt {c}}\right ) \sqrt {c}-b \sqrt {c}\, \arctanh \left (\frac {\sqrt {c}}{x}\right )\) \(39\)
derivativedivides \(a x +b x \arctanh \left (\frac {c}{x^{2}}\right )-b \sqrt {c}\, \arctan \left (\frac {\sqrt {c}}{x}\right )-b \sqrt {c}\, \arctanh \left (\frac {\sqrt {c}}{x}\right )\) \(42\)
risch \(a x +\frac {b x \ln \left (x^{2}+c \right )}{2}-\frac {b x \ln \left (-x^{2}+c \right )}{2}+\frac {i b \pi x \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )^{2}}{4}-\frac {i b \pi x \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{3}}{4}+\frac {i b \pi x \,\mathrm {csgn}\left (i \left (x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )^{2}}{4}+\frac {i b \pi x \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (-x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )}{4}-\frac {i b \pi x \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )^{3}}{4}+\frac {i b \pi x \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{2}}{2}-\frac {i b \pi x \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{2}}{4}-\frac {i b \pi x \,\mathrm {csgn}\left (i \left (-x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{2}}{4}-\frac {i b \pi x}{2}-\frac {i b \pi x \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )}{4}+\frac {b \sqrt {c}\, \ln \left (-\sqrt {c}+x \right )}{2}-\frac {b \sqrt {c}\, \ln \left (x +\sqrt {c}\right )}{2}+\frac {b \sqrt {-c}\, \ln \left (x +\sqrt {-c}\right )}{2}-\frac {b \sqrt {-c}\, \ln \left (-\sqrt {-c}+x \right )}{2}\) \(347\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c/x^2),x,method=_RETURNVERBOSE)

[Out]

a*x+b*x*arctanh(c/x^2)+b*arctan(x/c^(1/2))*c^(1/2)-b*c^(1/2)*arctanh(1/x*c^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.46, size = 51, normalized size = 1.16 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {2 \, \arctan \left (\frac {x}{\sqrt {c}}\right )}{\sqrt {c}} + \frac {\log \left (\frac {x - \sqrt {c}}{x + \sqrt {c}}\right )}{\sqrt {c}}\right )} + 2 \, x \operatorname {artanh}\left (\frac {c}{x^{2}}\right )\right )} b + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="maxima")

[Out]

1/2*(c*(2*arctan(x/sqrt(c))/sqrt(c) + log((x - sqrt(c))/(x + sqrt(c)))/sqrt(c)) + 2*x*arctanh(c/x^2))*b + a*x

________________________________________________________________________________________

Fricas [A] Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (36) = 72\).
time = 0.49, size = 138, normalized size = 3.14 \begin {gather*} \left [\frac {1}{2} \, b x \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + b \sqrt {c} \arctan \left (\frac {x}{\sqrt {c}}\right ) + \frac {1}{2} \, b \sqrt {c} \log \left (\frac {x^{2} - 2 \, \sqrt {c} x + c}{x^{2} - c}\right ) + a x, \frac {1}{2} \, b x \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + b \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{c}\right ) + \frac {1}{2} \, b \sqrt {-c} \log \left (\frac {x^{2} + 2 \, \sqrt {-c} x - c}{x^{2} + c}\right ) + a x\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="fricas")

[Out]

[1/2*b*x*log((x^2 + c)/(x^2 - c)) + b*sqrt(c)*arctan(x/sqrt(c)) + 1/2*b*sqrt(c)*log((x^2 - 2*sqrt(c)*x + c)/(x
^2 - c)) + a*x, 1/2*b*x*log((x^2 + c)/(x^2 - c)) + b*sqrt(-c)*arctan(sqrt(-c)*x/c) + 1/2*b*sqrt(-c)*log((x^2 +
 2*sqrt(-c)*x - c)/(x^2 + c)) + a*x]

________________________________________________________________________________________

Sympy [A]
time = 2.10, size = 632, normalized size = 14.36 \begin {gather*} a x + b \left (\begin {cases} 0 & \text {for}\: c = 0 \\- \infty x & \text {for}\: c = - x^{2} \\\infty x & \text {for}\: c = x^{2} \\- \frac {2 c^{\frac {5}{2}} \sqrt {- c} \log {\left (- \sqrt {c} + x \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {c^{\frac {5}{2}} \sqrt {- c} \log {\left (x - \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {c^{\frac {5}{2}} \sqrt {- c} \log {\left (x + \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} - \frac {2 c^{\frac {5}{2}} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {2 \sqrt {c} x^{4} \sqrt {- c} \log {\left (- \sqrt {c} + x \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} - \frac {\sqrt {c} x^{4} \sqrt {- c} \log {\left (x - \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} - \frac {\sqrt {c} x^{4} \sqrt {- c} \log {\left (x + \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {2 \sqrt {c} x^{4} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} - \frac {c^{3} \log {\left (x - \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {c^{3} \log {\left (x + \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} - \frac {2 c^{2} x \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {c x^{4} \log {\left (x - \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} - \frac {c x^{4} \log {\left (x + \sqrt {- c} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} + \frac {2 x^{5} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 c^{2} \sqrt {- c} + 2 x^{4} \sqrt {- c}} & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c/x**2),x)

[Out]

a*x + b*Piecewise((0, Eq(c, 0)), (-oo*x, Eq(c, -x**2)), (oo*x, Eq(c, x**2)), (-2*c**(5/2)*sqrt(-c)*log(-sqrt(c
) + x)/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) + c**(5/2)*sqrt(-c)*log(x - sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*s
qrt(-c)) + c**(5/2)*sqrt(-c)*log(x + sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) - 2*c**(5/2)*sqrt(-c)*atan
h(c/x**2)/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) + 2*sqrt(c)*x**4*sqrt(-c)*log(-sqrt(c) + x)/(-2*c**2*sqrt(-c) +
 2*x**4*sqrt(-c)) - sqrt(c)*x**4*sqrt(-c)*log(x - sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) - sqrt(c)*x**
4*sqrt(-c)*log(x + sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) + 2*sqrt(c)*x**4*sqrt(-c)*atanh(c/x**2)/(-2*
c**2*sqrt(-c) + 2*x**4*sqrt(-c)) - c**3*log(x - sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) + c**3*log(x +
sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) - 2*c**2*x*sqrt(-c)*atanh(c/x**2)/(-2*c**2*sqrt(-c) + 2*x**4*sq
rt(-c)) + c*x**4*log(x - sqrt(-c))/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)) - c*x**4*log(x + sqrt(-c))/(-2*c**2*sq
rt(-c) + 2*x**4*sqrt(-c)) + 2*x**5*sqrt(-c)*atanh(c/x**2)/(-2*c**2*sqrt(-c) + 2*x**4*sqrt(-c)), True))

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 57, normalized size = 1.30 \begin {gather*} \frac {1}{2} \, {\left (2 \, c {\left (\frac {\arctan \left (\frac {x}{\sqrt {-c}}\right )}{\sqrt {-c}} + \frac {\arctan \left (\frac {x}{\sqrt {c}}\right )}{\sqrt {c}}\right )} + x \log \left (-\frac {\frac {c}{x^{2}} + 1}{\frac {c}{x^{2}} - 1}\right )\right )} b + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="giac")

[Out]

1/2*(2*c*(arctan(x/sqrt(-c))/sqrt(-c) + arctan(x/sqrt(c))/sqrt(c)) + x*log(-(c/x^2 + 1)/(c/x^2 - 1)))*b + a*x

________________________________________________________________________________________

Mupad [B]
time = 0.82, size = 52, normalized size = 1.18 \begin {gather*} a\,x+\frac {b\,x\,\ln \left (x^2+c\right )}{2}+b\,\sqrt {c}\,\mathrm {atan}\left (\frac {x}{\sqrt {c}}\right )-\frac {b\,x\,\ln \left (x^2-c\right )}{2}+b\,\sqrt {c}\,\mathrm {atan}\left (\frac {x\,1{}\mathrm {i}}{\sqrt {c}}\right )\,1{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a + b*atanh(c/x^2),x)

[Out]

a*x + (b*x*log(c + x^2))/2 + b*c^(1/2)*atan(x/c^(1/2)) + b*c^(1/2)*atan((x*1i)/c^(1/2))*1i - (b*x*log(x^2 - c)
)/2

________________________________________________________________________________________